<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    p {
      margin: 100px auto;
      width: 200px;
      height: 200px;
      background-color: pink;
      transform: scale(1, 1);
      transition: all 0.3s;
    }
    p:hover {
      /* 1.基本用法：宽度为 2 倍、高度不变 */
      /* transform: scale(2, 1); */

      /* 2.等比例放大 */
      /* transform: scale(2); */
      /* 相当于 */
      /* transform: scale(2, 2); */

      /* 3.缩小：宽度缩小一倍，高度不变 */
      transform: scale(0.5, 1);
    }
  </style>
  <body>
    <p></p>
  </body>
</html>
